<?php
	header('Content-Type: text/html;charset=UTF-8');
?>

<?php
include('../../Redirect_modules.php');
$_REQUEST['modfunc'] = 'choose_course';

//if($_REQUEST['course_id'])
//{
//	$weights_RET = DBGet(DBQuery("SELECT COURSE_WEIGHT,GPA_MULTIPLIER FROM COURSE_WEIGHTS WHERE COURSE_ID='$_REQUEST[course_id]'"));
//	if(count($weights_RET)==1)
//		$_REQUEST['course_weight'] = $weights_RET[1]['COURSE_WEIGHT'];
//}

if(!$_REQUEST['course_id'])
	include 'modules/Scheduling/CoursesforWindow.php';
else
{
	$course_title = DBGet(DBQuery('SELECT TITLE FROM courses WHERE COURSE_ID=\''.$_REQUEST['course_id'].'\''));
	$course_title = $course_title[1]['TITLE']. '<INPUT type=hidden name=request_course_id value='.$_REQUEST['course_id'].'>';

	echo "<script language=javascript>opener.document.getElementById(\"request_div\").innerHTML = \"$course_title<BR><small><INPUT type=checkbox name=not_request_course value=Y>Not Requested</small>\"; window.close();</script>";
}

?>